<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
            <title>Detail</title>
            
            <link href="Style.css" rel="stylesheet" type="text/css" />
            <script src="jquery-1.7.2.min.js" type="text/javascript"></script>
            <script src="Ponto.js" type="text/javascript"></script>
            <script src="Common.js" type="text/javascript"></script>
            <script type="text/javascript">
                
                var $data;
                
                $(document).ready(function(){
                                  
                                  $data = JSON.parse(localStorage["data"]);
                                  
                                  var $str1 = "<tr><td>仓库</td><td>" + $data.facility + "</td></tr>"
                                  + "<tr><td>地址</td><td>" + $data.address + "</td></tr>"
                                  + "<tr><td>仓库电话</td><td><a onClick='toCall($data.warehouse_phone_number)' href='#'>" + $data.warehouse_phone_number + "</a></td></tr>"
                                  + "<tr><td>采购电话</td><td><a onClick='toCall($data.buyer_phone_number)' href='#'>" + $data.buyer_phone_number + "</a></td></tr>"
                                  $("#infoTable").html($str1);
                                  
                                  var $str2 = "<tr><td>名称</td><td>数量</td><td>单位</td></tr>";
                                  for (var i = 0; i < $data.items.length; i++){
                                  var $item = $data.items[i];
                                  $str2 += "<tr><td>" + $item.name + "</td><td>" + $item.quantity + "</td><td>" + $item.container_name + "</td></tr>";
                                  }
                                  $("#itemTable").html($str2);
                                  
                                  $("table").css({"border-left": "1px solid #E67E22", "border-top": "1px solid #E67E22"});
                                  });
                </script>
            
            <style type="text/css">
                table{
                    height: 80px;
                }
            tr, td {
                height: 40px;
                margin: 0;
                padding: 0;
                border: 0;
                border-right: 2px solid #E67E22;
                border-bottom: 2px solid #E67E22;
            }
            #infoTable{
                margin-top: 40px;
                margin-bottom: 40px;
            }
            </style>
            </head>
    <body>
        <table id="infoTable" cellpadding="0" cellspacing="0">
        </table>
        <table id="itemTable" cellpadding="0" cellspacing="0">
        </table>
        <div id="errorDiv"></div>
    </body>
</html>